<template>
  <van-pagination
    v-model="currentPage"
    :items-per-page="itemnum"
    :show-page-size="showpagesize"
    force-ellipses
    :total-items="total"
    @change="sendpagenum"
  />
</template>

<script>
export default {
  components: {},
  props: ["total"],
  data() {
    return {
      currentPage: 1, //第几页
      itemnum: 10, //每页多少数据
      showpagesize: 5 //显示的页码个数
    };
  },
  watch: {},
  computed: {},
  methods: {
    sendpagenum() {
      this.$emit("pagenum", [this.currentPage, this.itemnum]);
    },
    changecurrent(page) {
      this.currentPage = page;
    }
  },
  created() {},
  mounted() {}
};
</script>
<style scoped>
</style>